<!DOCTYPE html>
<html lang="en">
    <head>
        {include file="public/header"}
        <link rel="stylesheet" href="/admin/vendor/bootstrap-tab/main.css">
    </head>
    <body>
	    <div class="wrapper">
		    {include file="public/nav"}
		    <div id="page-wrapper" style="min-height: 325px;">
                <div id="tabContainer" class="tab-container"></div>
		    </div>
	    </div>
	    {include file="public/javascript"}
        <script type="text/javascript" src="/admin/vendor/bootstrap-tab/main.js"></script>
        <script>
         $("#tabContainer").tabs({
             data: [{
                 id: 'home',
                 text: '首页',
                 url: "/index.php/admin/index/main.html",
                 closeable: false
             }],
             showIndex: 0,
             loadAll: false
         })

         /*          $("#tabContainer").data("tabs").addTab({id: 'test', text: 'addTab', closeable: true, url: 'tab_content.html'}) */
        </script>
        <script type="text/javascript">
         ;(function(JQuery){
             menu = $('.menu-tab');
             menu.on('click',function(e){
                 self = $(this);
                 href = self.data('href');
                 id = self.data('id');
                 text = self.text();
                 $("#tabContainer").data("tabs").addTab({id: id, text: text, closeable: true, url: href});
             });
             var newtab = function(href,id,text){
                 $("#tabContainer").data("tabs").addTab({id: id, text: text, closeable: true, url: href});
             }
             window.newtab = newtab;
         })(window.JQuery);
        </script>
    </body>
</html>
